Component({
  data: {
    selected: "",
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    "list": [
      {
        "pagePath": "/pages/home/index",
        "text": "返回首页",
        "iconPath": "/assets/img/findparkTag.png",
        "selectedIconPath": "/assets/img/findparkTagSelect.png"
      },
      {
        "pagePath": "/pages/message/message",
        "text": "消息",
        "iconPath": "/assets/img/shareTag.png",
        "selectedIconPath": "/assets/img/shareSelect.png"
      },
      {
        "pagePath": "/pages/my/my",
        "text": "我的",
        "iconPath": "/assets/img/myTag.png",
        "selectedIconPath": "/assets/img/myTagSelect.png"
      }
    ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})